package com.zhouyu.beanfactory;

import com.zhouyu.service.OrderService;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;

public class TimBeanFactoryPostProcessor implements BeanFactoryPostProcessor {
	@Override
	public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException {
		beanFactory.registerSingleton("myOrderService",new OrderService());
		BeanDefinition bd = beanFactory.getBeanDefinition("userService");
//		bd.setAutowireCandidate();

	}
}
